package cn.jiyun.service.impl;

import cn.jiyun.mapper.Log2Mapper;
import cn.jiyun.mapper.LogMapper;
import cn.jiyun.pojo.Log;
import cn.jiyun.pojo.Log2;
import cn.jiyun.service.Log2Service;
import cn.jiyun.service.LogService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

@Service
public class Log2ServiceImpl extends ServiceImpl<Log2Mapper, Log2> implements Log2Service {

    @Override
    public Page findPage(Integer pageNum, Integer pageSize, Log2 log2) {
        Page page=new Page(pageNum,pageSize);
        LambdaQueryWrapper<Log2> qr = new LambdaQueryWrapper<>();
        qr.eq(log2.getType1()!=null,Log2::getType1,log2.getType1());
        Page selectPage = baseMapper.selectPage(page, qr);
        return selectPage;
    }

}
